FROM ubuntu:v1

COPY requirements.txt /
COPY entrypoint.sh /
COPY supervisord.conf /
COPY server.conf /

RUN  apt-get update && apt -y install python3 python3-pip && pip3 install -r /requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

COPY app /server/app/
COPY common /server/common/
COPY mis /server/mis/
COPY mp /server/mp/


WORKDIR /server

ENV DB_NAME "flask_film"
ENV DB_USER "dev"
ENV DB_PASSWORD "dev@123"
ENV DB_HOST "10.211.55.4"
ENV REDIS_HOST "10.211.55.4"
ENV REDIS_PORT 6379
ENV APP_CONFIG "dev"
ENV FLASK_APP "app.main.py"

# 指定对外开放端口
EXPOSE 5000

ENTRYPOINT bash /entrypoint.sh